import { AuthMeta } from '../models/AuthItem';

export const configTable = [
  {
    title: 'ID',
    dataIndex: 'id',
    width: 60,
    customRender: ({ record }: { record: AuthMeta }) => (
      <div class='text-sm text-secondary-200  code'>{record.id}</div>
    ),
  },
  {
    title: '应用',
    dataIndex: 'dataId',
    width: 150,
  },
  {
    title: '时间',
    dataIndex: 'time',
    width: 130,
    customCell: () => ({
      class: 'text-sm text-secondary-200',
    }),
  },
  {
    title: '操作人',
    dataIndex: 'operator',
    width: 100,
    customCell: () => ({
      class: 'text-sm',
    }),
  },
] as any[];

export const configTableWidth = configTable
  .map((i) => i.width)
  .reduce((a, b) => a + b, 0);
